package org.firecloud.h5fun.model;

import java.util.Properties;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * 发送邮件的邮箱设置
 * @author fc
 *
 */
public class MailConfig extends Authenticator {
	public String username = "849048632@qq.com";
	public String password = "a7523003";
	public Properties prop = null;
	private static MailConfig _mail_config = null;
	private MailConfig(){
		prop = new Properties();
		prop.put("mail.smtp.auth", "true");
		prop.put("mail.smtp.host", "smtp.qq.com");
	};
	public static MailConfig get_mail_config(){
		if(_mail_config==null){
			_mail_config = new MailConfig();
		}
		return _mail_config;
	}
	@Override
	protected PasswordAuthentication getPasswordAuthentication() {
		return new PasswordAuthentication(username, password);
	}
}
